1. Field of the Invention
The invention relates to a transforming apparatus, and more particularly to a transforming apparatus used for transforming a first image into a second image.
2. Description of the Prior Art
Gamma correction (GC) is served as CRT response calibration initially to adjust the overall brightness of an image displayed on screen. Images that are not properly corrected may look either pale or too dark. On the other hand, gamma correction models human perceptual response quite well. In modern applications, people implement GC to enhance contrast experience for the latter purpose.
In the past, people implemented GC in hardware by look-up tables (LUTs). While accuracy can be obtained, the needed memory space is an issue. For n-bit image data, it costs n*2n+1 bits of memory for the transformation of single gamma coefficient, which may occupy a large area in a chip. The situation can be worse if the transformation of multiple gamma coefficients is to be supported. U.S. Pat. No. 5,706,058 tried to divide the whole LUT into two smaller sub-LUTs. Though the needed memory space was lowered down, this method was only suitable for the transformation of single gamma coefficient. U.S. Pat. No. 5,990,949 tried to match LUTs for preview and snapshot modes, which in turn needed one more LUT to accomplish their goals. Similarly, the fundamental architecture of U.S. Pat. No. 5,990,949 was designed for the transformation of single gamma coefficient.
If the transformation of multiple gamma coefficients needs to be supported, the memory space increases monotonically. Therefore, it is desirable to implement gamma correction in pure combinational circuits. The representative patent that implemented GC in combinational circuits is U.S. Pat. No. 5,818,521, which divided the whole gamma curve into 2 to 5 sections. Each section was then approximated by 2nd-order power functions. Furthermore, the number of multipliers and adders can be optimized through careful architecture design.
However, multipliers are inevitable in U.S. Pat. No. 5,818,521, since it is essential for 2nd-order power functions. Since multipliers are still too large for compact design, it is necessary to use shift-and-add combinational circuits to implement the computational GC.
Accordingly, the invention proposes a transforming apparatus that the gamma curve is divided into several sections, which are approximated by 1st-order power function. Meanwhile, multipliers are replaced with shifting operations to compute the power function, simplifying the whole architecture design and resulting in less hardware cost.